/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.aptech.entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Winner
 */
@Entity
@Table(name = "tblFeedback")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "TblFeedback.findAll", query = "SELECT t FROM TblFeedback t"),
    @NamedQuery(name = "TblFeedback.findByFbID", query = "SELECT t FROM TblFeedback t WHERE t.fbID = :fbID"),
    @NamedQuery(name = "TblFeedback.findByFbClientName", query = "SELECT t FROM TblFeedback t WHERE t.fbClientName = :fbClientName"),
    @NamedQuery(name = "TblFeedback.findByFbDescription", query = "SELECT t FROM TblFeedback t WHERE t.fbDescription = :fbDescription"),
    @NamedQuery(name = "TblFeedback.findByFbSatisfyingLevel", query = "SELECT t FROM TblFeedback t WHERE t.fbSatisfyingLevel = :fbSatisfyingLevel"),
    @NamedQuery(name = "TblFeedback.findByFbProblem", query = "SELECT t FROM TblFeedback t WHERE t.fbProblem = :fbProblem"),
    @NamedQuery(name = "TblFeedback.findByFbImprovement", query = "SELECT t FROM TblFeedback t WHERE t.fbImprovement = :fbImprovement"),
    @NamedQuery(name = "TblFeedback.findByFbStatus", query = "SELECT t FROM TblFeedback t WHERE t.fbStatus = :fbStatus"),
    @NamedQuery(name = "TblFeedback.findByUser", query = "SELECT t FROM TblFeedback t WHERE t.usID.usID=:usID")})
public class TblFeedback implements Serializable {

    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "fbID")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer fbID;
    @Size(max = 50)
    @Column(name = "fbClientName")
    private String fbClientName;
    @Size(max = 1073741823)
    @Column(name = "fbDescription")
    private String fbDescription;
    @Column(name = "fbSatisfyingLevel")
    private Integer fbSatisfyingLevel;
    @Size(max = 1073741823)
    @Column(name = "fbProblem")
    private String fbProblem;
    @Size(max = 1073741823)
    @Column(name = "fbImprovement")
    private String fbImprovement;
    @Column(name = "fbStatus")
    private Boolean fbStatus;
    @JoinColumn(name = "usID", referencedColumnName = "usID")
    @ManyToOne
    private TblUser usID;
    @JoinColumn(name = "mnID", referencedColumnName = "mnID")
    @ManyToOne
    private TblManager mnID;

    public TblFeedback() {
    }

    public TblFeedback(Integer fbID) {
        this.fbID = fbID;
    }

    public Integer getFbID() {
        return fbID;
    }

    public void setFbID(Integer fbID) {
        this.fbID = fbID;
    }

    public String getFbClientName() {
        return fbClientName;
    }

    public void setFbClientName(String fbClientName) {
        this.fbClientName = fbClientName;
    }

    public String getFbDescription() {
        return fbDescription;
    }

    public void setFbDescription(String fbDescription) {
        this.fbDescription = fbDescription;
    }

    public Integer getFbSatisfyingLevel() {
        return fbSatisfyingLevel;
    }

    public void setFbSatisfyingLevel(Integer fbSatisfyingLevel) {
        this.fbSatisfyingLevel = fbSatisfyingLevel;
    }

    public String getFbProblem() {
        return fbProblem;
    }

    public void setFbProblem(String fbProblem) {
        this.fbProblem = fbProblem;
    }

    public String getFbImprovement() {
        return fbImprovement;
    }

    public void setFbImprovement(String fbImprovement) {
        this.fbImprovement = fbImprovement;
    }

    public Boolean getFbStatus() {
        return fbStatus;
    }

    public void setFbStatus(Boolean fbStatus) {
        this.fbStatus = fbStatus;
    }

    public TblUser getUsID() {
        return usID;
    }

    public void setUsID(TblUser usID) {
        this.usID = usID;
    }

    public TblManager getMnID() {
        return mnID;
    }

    public void setMnID(TblManager mnID) {
        this.mnID = mnID;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (fbID != null ? fbID.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TblFeedback)) {
            return false;
        }
        TblFeedback other = (TblFeedback) object;
        if ((this.fbID == null && other.fbID != null) || (this.fbID != null && !this.fbID.equals(other.fbID))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.aptech.entities.TblFeedback[ fbID=" + fbID + " ]";
    }
}
